|
This page last changed on Jun 07, 2011 by ggaskell.
 | Linux/Solaris system administration is outside the scope of Atlassian support. This page is provided for your information only. |
On Linux/Solaris, the best practice is to install, configure and run each service (including JIRA) as a dedicated user with only the permissions they require.
To install, configure and get JIRA to start automatically on Linux/Solaris:
- Create a jira user account which will be used to run JIRA. For example, enter the following at a Linux/Solaris console:
- Create a directory into which JIRA will be installed. For example:
- Log in as the jira user to install JIRA:
- Assuming you downloaded the JIRA standalone from a 'tar.gz' archive, you need to extract it:
- Edit current/atlassian-jira/WEB-INF/classes/jira-application.properties and set jira.home=/var/atlassian/application-data/jira
- Then back as root, create the file /etc/init.d/jira (code shown below), which will be responsible for starting up JIRA after a reboot (or when manually invoked).
#!/bin/sh -e
# JIRA startup script
#chkconfig: 2345 80 05
#description: JIRA
# Define some variables
# Name of app ( JIRA, Confluence, etc )
APP=jira
# Name of the user to run as
USER=jira
# Location of application's bin directory
BASE=/opt/atlassian/jira/current
# Location of Java JDK
export JAVA_HOME=/usr/lib/jvm/java-6-sun
case "$1" in
# Start command
start)
echo "Starting $APP"
/bin/su -m $USER -c "cd $BASE/logs && $BASE/bin/startup.sh &> /dev/null"
;;
# Stop command
stop)
echo "Stopping $APP"
/bin/su -m $USER -c "$BASE/bin/shutdown.sh &> /dev/null"
echo "$APP stopped successfully"
;;
# Restart command
restart)
$0 stop
sleep 5
$0 start
;;
*)
echo "Usage: /etc/init.d/$APP {start|restart|stop}"
exit 1
;;
esac
exit 0
- Make the init script executable:
- Place symlinks in the run-level directories to start and stop this script automatically.
- For Debian-based systems:
The following commands will be executed to place symlinks in the run-level directories:
- For RedHat-based systems:
 | the init.d script contains chkconfig settings |
- Ensure the script is executed in the correct order, in particular after the database startup script.
 | Thank you for this information Thank you to Matthew Block and Pete Toscano for the original comments that we based this information on. |
|